import cv2
from matplotlib import pyplot as plt  

ImgPath = 'F:/awei/code/mark/'
ImageName = 'mark5.bmp'
img = cv2.imread( ImgPath+ImageName, cv2.IMREAD_GRAYSCALE)

# cv::Ptr < cv::freetype::FreeType2 > ft2;
ft2 = cv2.freetype.createFreeType2()
# ft2.loadFontData("./mplus-1p-regular.ttf", 0);

cv2.freetype_FreeType2.putText( img=ft2, text = "测试中文", org = (100,100) , fontHeight=1.0, color=(255,0,0), )
# dector = cv2.line_descriptor.create();
#
# keypoints,des = dector.compute(img,None)
#
# cv2.drawKeypoints(img, keypoints, img, (255,0,0) )

plt.imshow(img, cmap = 'gray')  
#plt.xticks([]), plt.yticks([])#去除横纵坐标  
plt.show() 
